3.4.37 \(\int (d \tan (e+f x))^{3/2} (a+a \tan (e+f x)) \, dx\) [337]

Optimal. Leaf size=93 \[ \frac {\sqrt {2} a d^{3/2} \text {ArcTan}\left (\frac {\sqrt {d}-\sqrt {d} \tan (e+f x)}{\sqrt {2} \sqrt {d \tan (e+f x)}}\right )}{f}+\frac {2 a d \sqrt {d \tan (e+f x)}}{f}+\frac {2 a (d \tan (e+f x))^{3/2}}{3 f} \]

[Out]

a*d^(3/2)*arctan(1/2*(d^(1/2)-d^(1/2)*tan(f*x+e))*2^(1/2)/(d*tan(f*x+e))^(1/2))*2^(1/2)/f+2*a*d*(d*tan(f*x+e))
^(1/2)/f+2/3*a*(d*tan(f*x+e))^(3/2)/f

________________________________________________________________________________________

Rubi [A]
time = 0.08, antiderivative size = 93, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {3609, 3613, 211} \begin {gather*} \frac {\sqrt {2} a d^{3/2} \text {ArcTan}\left (\frac {\sqrt {d}-\sqrt {d} \tan (e+f x)}{\sqrt {2} \sqrt {d \tan (e+f x)}}\right )}{f}+\frac {2 a d \sqrt {d \tan (e+f x)}}{f}+\frac {2 a (d \tan (e+f x))^{3/2}}{3 f} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(d*Tan[e + f*x])^(3/2)*(a + a*Tan[e + f*x]),x]

[Out]

(Sqrt[2]*a*d^(3/2)*ArcTan[(Sqrt[d] - Sqrt[d]*Tan[e + f*x])/(Sqrt[2]*Sqrt[d*Tan[e + f*x]])])/f + (2*a*d*Sqrt[d*
Tan[e + f*x]])/f + (2*a*(d*Tan[e + f*x])^(3/2))/(3*f)

Rule 211

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/Rt[a/b, 2]], x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 3609

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[d*
((a + b*Tan[e + f*x])^m/(f*m)), x] + Int[(a + b*Tan[e + f*x])^(m - 1)*Simp[a*c - b*d + (b*c + a*d)*Tan[e + f*x
], x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && GtQ[m, 0]

Rule 3613

Int[((c_) + (d_.)*tan[(e_.) + (f_.)*(x_)])/Sqrt[(b_.)*tan[(e_.) + (f_.)*(x_)]], x_Symbol] :> Dist[-2*(d^2/f),
Subst[Int[1/(2*c*d + b*x^2), x], x, (c - d*Tan[e + f*x])/Sqrt[b*Tan[e + f*x]]], x] /; FreeQ[{b, c, d, e, f}, x
] && EqQ[c^2 - d^2, 0]

Rubi steps

\begin {align*} \int (d \tan (e+f x))^{3/2} (a+a \tan (e+f x)) \, dx &=\frac {2 a (d \tan (e+f x))^{3/2}}{3 f}+\int \sqrt {d \tan (e+f x)} (-a d+a d \tan (e+f x)) \, dx\\ &=\frac {2 a d \sqrt {d \tan (e+f x)}}{f}+\frac {2 a (d \tan (e+f x))^{3/2}}{3 f}+\int \frac {-a d^2-a d^2 \tan (e+f x)}{\sqrt {d \tan (e+f x)}} \, dx\\ &=\frac {2 a d \sqrt {d \tan (e+f x)}}{f}+\frac {2 a (d \tan (e+f x))^{3/2}}{3 f}-\frac {\left (2 a^2 d^4\right ) \text {Subst}\left (\int \frac {1}{2 a^2 d^4+d x^2} \, dx,x,\frac {-a d^2+a d^2 \tan (e+f x)}{\sqrt {d \tan (e+f x)}}\right )}{f}\\ &=\frac {\sqrt {2} a d^{3/2} \tan ^{-1}\left (\frac {\sqrt {d}-\sqrt {d} \tan (e+f x)}{\sqrt {2} \sqrt {d \tan (e+f x)}}\right )}{f}+\frac {2 a d \sqrt {d \tan (e+f x)}}{f}+\frac {2 a (d \tan (e+f x))^{3/2}}{3 f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [C] Result contains complex when optimal does not.
time = 0.47, size = 105, normalized size = 1.13 \begin {gather*} \frac {\left (\frac {1}{3}+\frac {i}{3}\right ) a (d \tan (e+f x))^{3/2} \left (-3 (-1)^{3/4} \text {ArcTan}\left ((-1)^{3/4} \sqrt {\tan (e+f x)}\right )+3 \sqrt [4]{-1} \tanh ^{-1}\left ((-1)^{3/4} \sqrt {\tan (e+f x)}\right )+(1-i) \sqrt {\tan (e+f x)} (3+\tan (e+f x))\right )}{f \tan ^{\frac {3}{2}}(e+f x)} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(d*Tan[e + f*x])^(3/2)*(a + a*Tan[e + f*x]),x]

[Out]

((1/3 + I/3)*a*(d*Tan[e + f*x])^(3/2)*(-3*(-1)^(3/4)*ArcTan[(-1)^(3/4)*Sqrt[Tan[e + f*x]]] + 3*(-1)^(1/4)*ArcT
anh[(-1)^(3/4)*Sqrt[Tan[e + f*x]]] + (1 - I)*Sqrt[Tan[e + f*x]]*(3 + Tan[e + f*x])))/(f*Tan[e + f*x]^(3/2))

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(302\) vs. \(2(76)=152\).
time = 0.28, size = 303, normalized size = 3.26

method result size
derivativedivides \(\frac {a \left (\frac {2 \left (d \tan \left (f x +e \right )\right )^{\frac {3}{2}}}{3}+2 d \sqrt {d \tan \left (f x +e \right )}-2 d^{2} \left (\frac {\left (d^{2}\right )^{\frac {1}{4}} \sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{8 d}+\frac {\sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{8 \left (d^{2}\right )^{\frac {1}{4}}}\right )\right )}{f}\) \(303\)
default \(\frac {a \left (\frac {2 \left (d \tan \left (f x +e \right )\right )^{\frac {3}{2}}}{3}+2 d \sqrt {d \tan \left (f x +e \right )}-2 d^{2} \left (\frac {\left (d^{2}\right )^{\frac {1}{4}} \sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{8 d}+\frac {\sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{8 \left (d^{2}\right )^{\frac {1}{4}}}\right )\right )}{f}\) \(303\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d*tan(f*x+e))^(3/2)*(a+a*tan(f*x+e)),x,method=_RETURNVERBOSE)

[Out]

1/f*a*(2/3*(d*tan(f*x+e))^(3/2)+2*d*(d*tan(f*x+e))^(1/2)-2*d^2*(1/8/d*(d^2)^(1/4)*2^(1/2)*(ln((d*tan(f*x+e)+(d
^2)^(1/4)*(d*tan(f*x+e))^(1/2)*2^(1/2)+(d^2)^(1/2))/(d*tan(f*x+e)-(d^2)^(1/4)*(d*tan(f*x+e))^(1/2)*2^(1/2)+(d^
2)^(1/2)))+2*arctan(2^(1/2)/(d^2)^(1/4)*(d*tan(f*x+e))^(1/2)+1)-2*arctan(-2^(1/2)/(d^2)^(1/4)*(d*tan(f*x+e))^(
1/2)+1))+1/8/(d^2)^(1/4)*2^(1/2)*(ln((d*tan(f*x+e)-(d^2)^(1/4)*(d*tan(f*x+e))^(1/2)*2^(1/2)+(d^2)^(1/2))/(d*ta
n(f*x+e)+(d^2)^(1/4)*(d*tan(f*x+e))^(1/2)*2^(1/2)+(d^2)^(1/2)))+2*arctan(2^(1/2)/(d^2)^(1/4)*(d*tan(f*x+e))^(1
/2)+1)-2*arctan(-2^(1/2)/(d^2)^(1/4)*(d*tan(f*x+e))^(1/2)+1))))

________________________________________________________________________________________

Maxima [A]
time = 0.52, size = 122, normalized size = 1.31 \begin {gather*} -\frac {3 \, a d^{3} {\left (\frac {\sqrt {2} \arctan \left (\frac {\sqrt {2} {\left (\sqrt {2} \sqrt {d} + 2 \, \sqrt {d \tan \left (f x + e\right )}\right )}}{2 \, \sqrt {d}}\right )}{\sqrt {d}} + \frac {\sqrt {2} \arctan \left (-\frac {\sqrt {2} {\left (\sqrt {2} \sqrt {d} - 2 \, \sqrt {d \tan \left (f x + e\right )}\right )}}{2 \, \sqrt {d}}\right )}{\sqrt {d}}\right )} - 2 \, \left (d \tan \left (f x + e\right )\right )^{\frac {3}{2}} a d - 6 \, \sqrt {d \tan \left (f x + e\right )} a d^{2}}{3 \, d f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*tan(f*x+e))^(3/2)*(a+a*tan(f*x+e)),x, algorithm="maxima")

[Out]

-1/3*(3*a*d^3*(sqrt(2)*arctan(1/2*sqrt(2)*(sqrt(2)*sqrt(d) + 2*sqrt(d*tan(f*x + e)))/sqrt(d))/sqrt(d) + sqrt(2
)*arctan(-1/2*sqrt(2)*(sqrt(2)*sqrt(d) - 2*sqrt(d*tan(f*x + e)))/sqrt(d))/sqrt(d)) - 2*(d*tan(f*x + e))^(3/2)*
a*d - 6*sqrt(d*tan(f*x + e))*a*d^2)/(d*f)

________________________________________________________________________________________

Fricas [A]
time = 1.47, size = 196, normalized size = 2.11 \begin {gather*} \left [\frac {3 \, \sqrt {2} a \sqrt {-d} d \log \left (\frac {d \tan \left (f x + e\right )^{2} - 2 \, \sqrt {2} \sqrt {d \tan \left (f x + e\right )} \sqrt {-d} {\left (\tan \left (f x + e\right ) - 1\right )} - 4 \, d \tan \left (f x + e\right ) + d}{\tan \left (f x + e\right )^{2} + 1}\right ) + 4 \, {\left (a d \tan \left (f x + e\right ) + 3 \, a d\right )} \sqrt {d \tan \left (f x + e\right )}}{6 \, f}, -\frac {3 \, \sqrt {2} a d^{\frac {3}{2}} \arctan \left (\frac {\sqrt {2} \sqrt {d \tan \left (f x + e\right )} {\left (\tan \left (f x + e\right ) - 1\right )}}{2 \, \sqrt {d} \tan \left (f x + e\right )}\right ) - 2 \, {\left (a d \tan \left (f x + e\right ) + 3 \, a d\right )} \sqrt {d \tan \left (f x + e\right )}}{3 \, f}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*tan(f*x+e))^(3/2)*(a+a*tan(f*x+e)),x, algorithm="fricas")

[Out]

[1/6*(3*sqrt(2)*a*sqrt(-d)*d*log((d*tan(f*x + e)^2 - 2*sqrt(2)*sqrt(d*tan(f*x + e))*sqrt(-d)*(tan(f*x + e) - 1
) - 4*d*tan(f*x + e) + d)/(tan(f*x + e)^2 + 1)) + 4*(a*d*tan(f*x + e) + 3*a*d)*sqrt(d*tan(f*x + e)))/f, -1/3*(
3*sqrt(2)*a*d^(3/2)*arctan(1/2*sqrt(2)*sqrt(d*tan(f*x + e))*(tan(f*x + e) - 1)/(sqrt(d)*tan(f*x + e))) - 2*(a*
d*tan(f*x + e) + 3*a*d)*sqrt(d*tan(f*x + e)))/f]

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} a \left (\int \left (d \tan {\left (e + f x \right )}\right )^{\frac {3}{2}}\, dx + \int \left (d \tan {\left (e + f x \right )}\right )^{\frac {3}{2}} \tan {\left (e + f x \right )}\, dx\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*tan(f*x+e))**(3/2)*(a+a*tan(f*x+e)),x)

[Out]

a*(Integral((d*tan(e + f*x))**(3/2), x) + Integral((d*tan(e + f*x))**(3/2)*tan(e + f*x), x))

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 290 vs. \(2 (81) = 162\).
time = 0.64, size = 290, normalized size = 3.12 \begin {gather*} -\frac {1}{12} \, d {\left (\frac {6 \, \sqrt {2} {\left (a d \sqrt {{\left | d \right |}} + a {\left | d \right |}^{\frac {3}{2}}\right )} \arctan \left (\frac {\sqrt {2} {\left (\sqrt {2} \sqrt {{\left | d \right |}} + 2 \, \sqrt {d \tan \left (f x + e\right )}\right )}}{2 \, \sqrt {{\left | d \right |}}}\right )}{d f} + \frac {6 \, \sqrt {2} {\left (a d \sqrt {{\left | d \right |}} + a {\left | d \right |}^{\frac {3}{2}}\right )} \arctan \left (-\frac {\sqrt {2} {\left (\sqrt {2} \sqrt {{\left | d \right |}} - 2 \, \sqrt {d \tan \left (f x + e\right )}\right )}}{2 \, \sqrt {{\left | d \right |}}}\right )}{d f} + \frac {3 \, \sqrt {2} {\left (a d \sqrt {{\left | d \right |}} - a {\left | d \right |}^{\frac {3}{2}}\right )} \log \left (d \tan \left (f x + e\right ) + \sqrt {2} \sqrt {d \tan \left (f x + e\right )} \sqrt {{\left | d \right |}} + {\left | d \right |}\right )}{d f} - \frac {3 \, \sqrt {2} {\left (a d \sqrt {{\left | d \right |}} - a {\left | d \right |}^{\frac {3}{2}}\right )} \log \left (d \tan \left (f x + e\right ) - \sqrt {2} \sqrt {d \tan \left (f x + e\right )} \sqrt {{\left | d \right |}} + {\left | d \right |}\right )}{d f} - \frac {8 \, {\left (\sqrt {d \tan \left (f x + e\right )} a d^{3} f^{2} \tan \left (f x + e\right ) + 3 \, \sqrt {d \tan \left (f x + e\right )} a d^{3} f^{2}\right )}}{d^{3} f^{3}}\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*tan(f*x+e))^(3/2)*(a+a*tan(f*x+e)),x, algorithm="giac")

[Out]

-1/12*d*(6*sqrt(2)*(a*d*sqrt(abs(d)) + a*abs(d)^(3/2))*arctan(1/2*sqrt(2)*(sqrt(2)*sqrt(abs(d)) + 2*sqrt(d*tan
(f*x + e)))/sqrt(abs(d)))/(d*f) + 6*sqrt(2)*(a*d*sqrt(abs(d)) + a*abs(d)^(3/2))*arctan(-1/2*sqrt(2)*(sqrt(2)*s
qrt(abs(d)) - 2*sqrt(d*tan(f*x + e)))/sqrt(abs(d)))/(d*f) + 3*sqrt(2)*(a*d*sqrt(abs(d)) - a*abs(d)^(3/2))*log(
d*tan(f*x + e) + sqrt(2)*sqrt(d*tan(f*x + e))*sqrt(abs(d)) + abs(d))/(d*f) - 3*sqrt(2)*(a*d*sqrt(abs(d)) - a*a
bs(d)^(3/2))*log(d*tan(f*x + e) - sqrt(2)*sqrt(d*tan(f*x + e))*sqrt(abs(d)) + abs(d))/(d*f) - 8*(sqrt(d*tan(f*
x + e))*a*d^3*f^2*tan(f*x + e) + 3*sqrt(d*tan(f*x + e))*a*d^3*f^2)/(d^3*f^3))

________________________________________________________________________________________

Mupad [B]
time = 4.84, size = 98, normalized size = 1.05 \begin {gather*} \frac {2\,a\,{\left (d\,\mathrm {tan}\left (e+f\,x\right )\right )}^{3/2}}{3\,f}+\frac {2\,a\,d\,\sqrt {d\,\mathrm {tan}\left (e+f\,x\right )}}{f}+\frac {{\left (-1\right )}^{1/4}\,a\,d^{3/2}\,\mathrm {atan}\left (\frac {{\left (-1\right )}^{1/4}\,\sqrt {d\,\mathrm {tan}\left (e+f\,x\right )}}{\sqrt {d}}\right )\,\left (-1+1{}\mathrm {i}\right )}{f}+\frac {{\left (-1\right )}^{1/4}\,a\,d^{3/2}\,\mathrm {atanh}\left (\frac {{\left (-1\right )}^{1/4}\,\sqrt {d\,\mathrm {tan}\left (e+f\,x\right )}}{\sqrt {d}}\right )\,\left (1+1{}\mathrm {i}\right )}{f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d*tan(e + f*x))^(3/2)*(a + a*tan(e + f*x)),x)

[Out]

(2*a*(d*tan(e + f*x))^(3/2))/(3*f) + (2*a*d*(d*tan(e + f*x))^(1/2))/f - ((-1)^(1/4)*a*d^(3/2)*atan(((-1)^(1/4)
*(d*tan(e + f*x))^(1/2))/d^(1/2))*(1 - 1i))/f + ((-1)^(1/4)*a*d^(3/2)*atanh(((-1)^(1/4)*(d*tan(e + f*x))^(1/2)
)/d^(1/2))*(1 + 1i))/f

________________________________________________________________________________________